package com.lbiuse.crm.manage.user.controller;


import com.lbiuse.biz.manage.user.dao.UserDAO;
import com.lbiuse.biz.manage.user.service.UserService;
import org.apache.log4j.Logger;
import org.bidtime.web.utils.RequestUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

@Controller
@RequestMapping("/web/user")
public class UserController {

	private static final Logger logger = Logger.getLogger(UserController.class);

	/*
	 * /blog/all/{pageIdx}/{pageSize} HTTP GET => �õ����е�blog ��ҳ /blog/1 HTTP GET
	 * => �õ�id = 1��blog /blog/1 HTTP DELETE => ɾ�� id = 1��blog /blog/1 HTTP PUT
	 * => ����id = 1��blog /blog HTTP POST => ����BLOG方法
	 */

	@Autowired
	private UserDAO dao;

	/*@Autowired
	private ShopUserDAO shopUserDao;*/

	// @Autowired
	// private CustDAO custDao;
	//
	// @Autowired
	// private CustShopDAO custShopDao;

/*	@Autowired
	private MpCityDAO mpCityDAO;*/
	@Autowired
	private UserService service;

	/**
	 * @param request
	 * @param response
	 * @param nPageIdx
	 * @param nPageSize
	 */
	@RequestMapping(value = "find/{pageIdx}/{pageSize}", method = RequestMethod.GET)
	public void getListAll(HttpServletRequest request,
			HttpServletResponse response,
			@PathVariable("pageIdx") Integer nPageIdx,
			@PathVariable("pageSize") Short nPageSize) {
		nPageSize = RequestUtils.getRequestValidPageSize(nPageSize);
		try {
			/*GsonEbRst gsonEbRst = dao.getGsonOfShopId(shopId, nPageIdx,
					nPageSize);
			ResponseUtils.setResponseResult(gsonEbRst, response);*/
		} catch (Exception e) {
			logger.error(e);
			/*ResponseUtils.setErrorMsgResponse(RequestUtils
					.getSqlFindErrorMessage("info.cust.label", request),
					response);*/
		}
	}

	/**
	 *
	 * @param request
	 * @param response
	 * @param nPageIdx
	 * @param nPageSize
	 */
	@RequestMapping(value = "find/userSelecter/{pageIdx}/{pageSize}")
	public void getUserSelecter(HttpServletRequest request,
			HttpServletResponse response,
			@PathVariable("pageIdx") Integer nPageIdx,
			@PathVariable("pageSize") Short nPageSize) {
		nPageSize = RequestUtils.getRequestValidPageSize(nPageSize);
		/*try {
			Map<String, Object> params = new HashMap<>();

			String content = RequestUtils.getString(request, "content");
			String dutyName = RequestUtils.getString(request, "dutyName");
			params.put("content", content);
			params.put("dutyName", dutyName);

			GsonEbRst gsonEbRst = dao.getUserSelecter(params, nPageIdx,
					nPageSize);
			ResponseUtils.setResponseResult(gsonEbRst, response);
		} catch (SQLException e) {
			logger.error(e);
			ResponseUtils.setErrorMsgResponse(
					RequestUtils.getFindDataErrorMessage(request), response);
		}*/
	}

	/**
	 * @param request
	 * @param response
	 */
	@RequestMapping(value = "find/departName", method = RequestMethod.GET)
	public void getOneDepart(HttpServletRequest request,
			HttpServletResponse response) {
		/*String userId = UserSessionInfo.getUserIdOfSession(request);
		try {
			GsonEbRst gsonEbRst = dao.getGsonOfUserId(userId);
			ResponseUtils.setResponseResult(gsonEbRst, response);
		} catch (SQLException e) {
			logger.error(e);
			ResponseUtils.setErrorMsgResponse(RequestUtils
					.getSqlFindErrorMessage("info.cust.label", request),
					response);
		}*/
	}

	private Long getPtCustIdOfInsertPt(String sGsonInData, Long shopId,
			String dutyName, HttpServletResponse response) throws Exception {
		/*String sData = RequestUtils.DATA + "=" + sGsonInData + "&" + "shopId"
				+ "=" + String.valueOf(shopId) + "&dutyName=" + dutyName
				+ "&isUser=1";
		String url = "ptcust/insert";
		GsonEbRstLong rst = HttpGsonPtUtils.getEbRstLong(url, sData, response);
		if (rst != null) {
			return rst.getResult();
		} else {
			return null;
		}*/
		return null;
	}


	/**
	 * �����û�
	 *
	 *            request HttpServletResponse response
	 * @return void
	 *                ,����� response ��д������Ϣ
	 */
	@RequestMapping(value = "insert/insertInfo", method = RequestMethod.POST)
	public void insertInfo(HttpServletRequest request,
			HttpServletResponse response) {
	/*	String userDate = request.getParameter(RequestUtils.DATA);
		String shopDate = request.getParameter("shopList");
		String postDate = request.getParameter("postDate");
		ParserDataSetJson up = ParserDataSetJson.fromString(userDate);
		ParserDataSetJson sp = ParserDataSetJson.fromString(shopDate);
		ParserDataSetJson pp = ParserDataSetJson.fromString(postDate);
		if (up == null || sp == null || pp == null) {
			ResponseUtils
					.setErrorMsgResponse(
							RequestUtils.getReadJsonDataErrorMessage(request),
							response);
			return;
		}
		String mp = null;
		String loginName = null;
		try {
			GsonHeadOneRow g = up.getListInsertRows().get(0);
			loginName = (String) g.getValueOfName("LoginName");
			if (StringUtils.isNotEmpty(loginName)) {
				if (dao.getIsLoginName(loginName) > 0) {
					ResponseUtils.setErrorMsgResponse("�ڲ���Ա������ͬ��¼��", response);
					return;
				}
			}
			mp = (String) g.getValueOfName("Mp");
			if (!StringUtils.isEmpty(mp)) {
				if (dao.existUserOfMp(AESUtils.getInst().encrypt(mp))) {
					ResponseUtils.setErrorMsgResponse("�ֻ���Ϊ" + mp + "����Ա�Ѵ���",
							response);
					return;
				}
			}
			up.getListInsertRows().get(0).addHeadData("createTime", new Date());
			String html = RequestUtils.getString(request, "html");
			Long id = service.insertInfo(up, sp, pp, html);
			String[] head = new String[] { "id" };
			Object[] data = new Object[] { id };
			ResponseUtils.toGsonEbRst(head, data, response);

		} catch (Exception e) {
			// DbConnection.rollback();
			logger.error(e);
			// ResponseUtils.setErrorMsgResponse("����ͻ�����:"+e.getMessage(),
			// response);
			ResponseUtils.setErrorMsgResponse(RequestUtils
					.getSqlInsertErrorMessage("info.cust.label", request),
					response);
		}*/
	}

	@Transactional(rollbackFor = Exception.class)
	@RequestMapping(value = "upload/image/{id}", method = RequestMethod.POST)
	public void upload(HttpServletRequest request,
			HttpServletResponse response, @PathVariable("id") Long id) {
		/*try {
			String path = GlobalParams.getGlobalParams().getApacheRoot()
					+ "user/" + id + "/";
			String httpPath = GlobalParams.getGlobalParams().getApacheUrl()
					+ "user/" + id + "/";

			List<String> listFileName = new ArrayList<String>();

			UploadFileUtil.uploadFileOfRequest(request, response, path,
					listFileName, "user");

			String paths = "";
			if (listFileName != null) {
				for (String str : listFileName) {
					if (StringUtils.isNotEmpty(str)) {
						paths = httpPath + str;
					}
				}
			}
			if (StringUtils.isNotEmpty(paths)) {

				int sResult = dao.updateImage(paths, id);
				if (sResult > 0) {
					ResponseUtils.setSuccessResponse(response);
				} else {
					ResponseUtils.setErrorMsgResponse(
							RequestUtils.getUploadPicErrorMessage(request),
							response);
				}
			} else {
				ResponseUtils.setErrorMsgResponse(
						RequestUtils.getUploadPicErrorMessage(request),
						response);
			}
		} catch (Exception e) {
			logger.error(e);
			DbConnection.rollback();
			ResponseUtils.setErrorMsgResponse(
					RequestUtils.getSqlInsertDataErrorMessage(request) + ":"
							+ e.getMessage(), response);
		}*/
	}

	@Transactional(rollbackFor = Exception.class)
	@RequestMapping(value = "edit/updateInfo", method = RequestMethod.POST)
	public void updateInfo(HttpServletRequest request,
			HttpServletResponse response) {
		/*String userDate = request.getParameter(RequestUtils.DATA);
		String shopDate = request.getParameter("shopList");
		String postDate = request.getParameter("postDate");
		ParserDataSetJson up = ParserDataSetJson.fromString(userDate);
		ParserDataSetJson sp = ParserDataSetJson.fromString(shopDate);
		ParserDataSetJson pp = ParserDataSetJson.fromString(postDate);
		if (up == null) {
			ResponseUtils
					.setErrorMsgResponse(
							RequestUtils.getReadJsonDataErrorMessage(request),
							response);
			return;
		}
		int nResult = 0;
		try {
			String html = RequestUtils.getString(request, "html");

			nResult = service.updateInfo(up, sp, pp, html);
			*//*
			 * if(nResult>0){ ShopMap.init(); }
			 *//*
			ResponseUtils.setSqlResultResponse(nResult, RequestUtils
					.getSqlUpdateErrorMessage("info.cust.label", request),
					response);
		} catch (Exception e) {
			// DbConnection.rollback();
			logger.error(e);
			// ResponseUtils.setErrorMsgResponse("����ͻ�����:"+e.getMessage(),
			// response);
			ResponseUtils.setErrorMsgResponse(RequestUtils
					.getSqlUpdateErrorMessage("info.cust.label", request),
					response);
		}*/

	}

	@RequestMapping(value = "edit/editManagerId", method = RequestMethod.POST)
	public void editManagerId(HttpServletRequest request,
			HttpServletResponse response) {
		/*String userDate = request.getParameter(RequestUtils.DATA);
		ParserDataSetJson up = ParserDataSetJson.fromString(userDate);

		if (up == null||!up.isExistsUpdateRows()) {
			ResponseUtils
					.setErrorMsgResponse(
							RequestUtils.getReadJsonDataErrorMessage(request),
							response);
			return;
		}
		int nResult = 0;
		try {
			nResult = dao.applyUpdates(up);
			ResponseUtils.setSqlResultResponse(nResult, RequestUtils
					.getSqlUpdateErrorMessage("info.cust.label", request),
					response);
		} catch (Exception e) {
			// DbConnection.rollback();
			logger.error(e);
			// ResponseUtils.setErrorMsgResponse("����ͻ�����:"+e.getMessage(),
			// response);
			ResponseUtils.setErrorMsgResponse(RequestUtils
					.getSqlUpdateErrorMessage("info.cust.label", request),
					response);
		}*/
	}

	/**
	 * �����û�
	 *
	 * @param HttpServletRequest
	 *            request HttpServletResponse response
	 * @return void
	 * @exception ���벻�ɹ�
	 *                ,����� response ��д������Ϣ
	 */
	@Transactional(rollbackFor = Exception.class)
	@RequestMapping(value = "insert", method = RequestMethod.POST)
	public void insert(HttpServletRequest request, HttpServletResponse response) {
		/*String sGsonInData = request.getParameter(RequestUtils.DATA);
		String shopId = request.getParameter("shopId");
		int nResult = 0;
		String mp = null;
		String loginName = null;
		GsonHeadOneRow g = GsonHeadOneRow.jsonStrToObject(sGsonInData);
		try {
			loginName = (String) g.getValueOfName("LoginName");
			if (StringUtils.isNotEmpty(loginName)) {
				if (dao.getIsLoginName(loginName) > 0) {
					ResponseUtils.setErrorMsgResponse("�ڲ���Ա������ͬ��¼��", response);
					return;
				}
			}
			mp = (String) g.getValueOfName("Mp");
			if (!StringUtils.isEmpty(mp)) {
				if (dao.existUserOfMp(AESUtils.getInst().encrypt(mp))) {
					ResponseUtils.setErrorMsgResponse("�ֻ���Ϊ" + mp + "����Ա�Ѵ���",
							response);
					return;
				}
				String StrNum = StringUtils.substring(mp, 0, 7);
				if (!(mpCityDAO.getCheckMp(StrNum))) {
					ResponseUtils.setErrorMsgResponse("�ֻ����벻�Ϸ�", response);
					return;
				}
			}

			nResult = dao.insertGsonHeadOneRow(g);
			Long id = dao.getLastId();
			if (id != null && id > 0) {
				nResult = shopUserDao
						.insertParams(new Object[] { shopId, id, 1 });
			}
			ResponseUtils.setSqlResultResponse(nResult, RequestUtils
					.getSqlInsertErrorMessage("info.cust.label", request),
					response);
		} catch (Exception e) {
			// DbConnection.rollback();
			logger.error(e);
			// ResponseUtils.setErrorMsgResponse("����ͻ�����:"+e.getMessage(),
			// response);
			ResponseUtils.setErrorMsgResponse(RequestUtils
					.getSqlInsertErrorMessage("info.cust.label", request),
					response);
		} finally {
			if (nResult <= 0) {
				DbConnection.rollback();
			} else {
				DbConnection.commit();
			}
		}*/
	}


	@Transactional(rollbackFor = Exception.class)
	@RequestMapping(value = "del", method = RequestMethod.POST)
	public void delete(HttpServletRequest request, HttpServletResponse response) {
		int nResult = 0;
		/*String id = RequestUtils.getStringOfId(request);
		try {
			String[] strParams = id.split(",");
			nResult = dao.deleteParams(strParams);
			if (nResult > 0) {
				nResult = shopUserDao.deleteParams(strParams);
			}
			ResponseUtils.setSqlResultResponse(nResult, RequestUtils
					.getSqlDeleteErrorMessage("info.cust.label", request),
					response);
		} catch (Exception e) {
			logger.error(e);
			ResponseUtils.setErrorMsgResponse(RequestUtils
					.getSqlDeleteErrorMessage("info.cust.label", request),
					response);
		} finally {
			if (nResult <= 0) {
				DbConnection.rollback();
			} else {
				DbConnection.commit();
			}
		}*/
	}

	@Transactional(rollbackFor = Exception.class)
	@RequestMapping(value = "edit/shopId/{shopId}", method = RequestMethod.POST)
	public void updateUserPt(HttpServletRequest request,
			HttpServletResponse response, @PathVariable("shopId") Long shopId) {
		/*try {
			Long id = RequestUtils.getLong(request, RequestUtils.ID);
			String dutyName = dao.getDutyNameOfUserId(id);
			if (StringUtils.isEmpty(dutyName)) {
				ResponseUtils.setErrorMsgResponse("����Աû�����ø�λ", response);
				return;
			}
			GsonHeadOneRow g = dao.getUserOfUserId(id);
			g.autoAddHeadData("CreateFileTime", new Date());
			// ת��pt_cust
			Long outId = getPtCustIdOfInsertPt(g.objectToJsonStr(),
					ShopMap.getOutIdOfShopId(shopId), dutyName, response);
			int nResult = 0;
			if (outId != null && outId > 0) {
				nResult = dao.updateOutIdOfId(outId, id);
			}
			if (nResult > 0) {
				DbConnection.commit();
				if (id != null) {
					String[] heads = new String[] { "outId" };
					Object[] datas = new Object[] { outId };
					ResponseUtils.toGsonEbRst(heads, datas, response);
				} else {
					ResponseUtils.setSqlResultResponse(nResult,
							RequestUtils.getSqlUpdateDataErrorMessage(request),
							response);
				}
			} else {
				DbConnection.rollback();
				ResponseUtils.setSqlResultResponse(nResult,
						RequestUtils.getSqlUpdateDataErrorMessage(request),
						response);
			}
		} catch (Exception e) {
			DbConnection.rollback();
			logger.error(e);
			ResponseUtils.setErrorMsgResponse(
					RequestUtils.getSqlUpdateDataErrorMessage(request) + ":"
							+ e.getMessage(), response);
		}
*/
	}

	/**
	 * �޸Ŀͻ�
	 *
	 * @param HttpServletRequest
	 *            request HttpServletResponse response
	 * @return void
	 * @exception ���벻�ɹ�
	 *                ,����� response ��д������Ϣ
	 */
	@Transactional(rollbackFor = Exception.class)
	@RequestMapping(value = "edit", method = RequestMethod.POST)
	public void update(HttpServletRequest request, HttpServletResponse response) {
		/*int nResult = 0;
		String id = request.getParameter("id");
		String sGsonInData = request.getParameter(RequestUtils.DATA);
		try {
			GsonHeadOneRow g = GsonHeadOneRow.jsonStrToObject(sGsonInData);
			if (g == null) {
				ResponseUtils.setErrorMsgResponse(
						RequestUtils.getReadJsonDataErrorMessage(request),
						response);
			} else {
				// g.encryptHead(UserDAO.HEADS_ENCRY);
				// g.encryptHead("password");
				String mp = (String) g.getValueOfName("Mp");
				String email = (String) g.getValueOfName("Email");
				if (mp != null) {
					String StrNum = StringUtils.substring(mp, 0, 7);
					if (!(mpCityDAO.getCheckMp(StrNum))) {
						ResponseUtils.setErrorMsgResponse("�ֻ����벻�Ϸ�", response);
						return;
					}
					if (dao.existUserOfMp(AESUtils.getInst().encrypt(mp))) {
						ResponseUtils.setErrorMsgResponse("������ͬ�ֻ���", response);
						return;
					}
				}
				if (email != null) {
					Long count = dao.getUserIdOfEmail(email);
					if (count > 0) {
						ResponseUtils.setErrorMsgResponse("������ͬ����", response);
						return;
					}
				}
				nResult = dao.updateJsonOneRow(g, id);
				ResponseUtils.setSqlResultResponse(nResult, RequestUtils
						.getSqlUpdateErrorMessage("info.cust.label", request),
						response);
			}
		} catch (Exception e) {
			logger.error(e);
			ResponseUtils.setErrorMsgResponse(
					RequestUtils.getSqlUpdateErrorMessage("info.cust.label",
							request) + ":" + e.getMessage(), response);
		} finally {
			if (nResult <= 0) {
				DbConnection.rollback();
			} else {
				DbConnection.commit();
			}
		}*/
	}

	/**
	 * �޸Ŀͻ�����
	 *
	 * @param HttpServletRequest
	 *            request HttpServletResponse response
	 * @return void
	 * @exception ���벻�ɹ�
	 *                ,����� response ��д������Ϣ
	 */
	@Transactional(rollbackFor = Exception.class)
	@RequestMapping(value = "edit/ps", method = RequestMethod.POST)
	public void updatePassword(HttpServletRequest request,
			HttpServletResponse response) {
		/*int nResult = 0;
		String newPs = request.getParameter("newPs");
		String oldPs = request.getParameter("oldPs");
		try {
			String newPs2 = AESUtils.getInst().encrypt(newPs);
			String oldPs2 = AESUtils.getInst().encrypt(oldPs);
			String userId = UserSessionInfo.getUserIdOfSession(request);
			if (!dao.isExistsOfUserIdPassword(userId, oldPs2)) {
				ResponseUtils.setErrorMsgResponse("ԭ���벻��ȷ", response);
				return;
			}
			nResult = dao.changePs(userId, newPs2, oldPs2);
			if (nResult <= 0) {
				ResponseUtils.setErrorMsgResponse("�޸�ʧ�ܣ�", response);
				DbConnection.rollback();
				return;
			}
			ResponseUtils.setSuccessResponse(response);
			DbConnection.commit();
		} catch (Exception e) {
			logger.error(e);
			DbConnection.rollback();
			ResponseUtils.setErrorMsgResponse("�޸�ʧ�ܣ�", response);
		}*/
	}

	/**
	 * �޸Ŀͻ�����
	 *
	 * @param HttpServletRequest
	 *            request HttpServletResponse response
	 * @return void
	 * @exception ���벻�ɹ�
	 *                ,����� response ��д������Ϣ
	 */
	/*
	 * @Transactional(rollbackFor = Exception.class)
	 *
	 * @RequestMapping(value = "edit/ps", method = RequestMethod.POST) public
	 * void updatePassword(HttpServletRequest request, HttpServletResponse
	 * response){ int nResult = 0; String newPs=request.getParameter("newPs");
	 * String oldPs=request.getParameter("oldPs"); try {
	 *
	 * ResponseUtils.setSqlResultResponse(nResult, "���벻����", response); //
	 * Integer userId
	 * =Integer.valueOf(UserSessionInfo.getUserIdOfSession(request)); nResult =
	 * dao.changePs(userId,newPs,oldPs);
	 * ResponseUtils.setSqlResultResponse(nResult, "�޸��������", response); } catch
	 * (Exception e) { logger.error(e);
	 * ResponseUtils.setErrorMsgResponse("�޸Ŀͻ��������:"+e.getMessage(), response);
	 * } finally { if (nResult<=0) { DbConnection.rollback(); } else {
	 * DbConnection.commit(); } } }
	 */

	/**
	 * @param request
	 * @param response
	 * @param nPageIdx
	 * @param nPageSize
	 */
	@RequestMapping(value = "find/userList/{pageIdx}/{pageSize}", method = RequestMethod.POST)
	public void getUserListAll(HttpServletRequest request,
			HttpServletResponse response,
			@PathVariable("pageIdx") Integer nPageIdx,
			@PathVariable("pageSize") Short nPageSize) {
		/*nPageSize = RequestUtils.getRequestValidPageSize(nPageSize);

		Map<String, Object> params = new HashMap<String, Object>();
		String mp = (String) RequestUtils.getString(request, "phone");
		if (StringUtils.isNotEmpty(mp)) {
			mp = AESUtils.getInst().encrypt(mp);
		}
		params.put("status", RequestUtils.getString(request, "status"));
		params.put("shopId", RequestUtils.getString(request, "shopId"));
		MapUtils.addPercentToMap(params, "mp", mp);
		MapUtils.addPercentToMap(params, "username",
				RequestUtils.getString(request, "username"));
		MapUtils.addPercentToMap(params, "loginname",
				RequestUtils.getString(request, "loginname"));
		// params.put("username", RequestUtils.getString(request, "username"));
		// params.put("loginname", RequestUtils.getString(request,
		// "loginname"));
		try {
			GsonEbRst gsonEbRst = dao.getUserList(params, nPageIdx, nPageSize);
			ResponseUtils.setResponseResult(gsonEbRst, response);
		} catch (SQLException e) {
			logger.error(e);
			ResponseUtils.setErrorMsgResponse(RequestUtils
					.getSqlFindErrorMessage("info.cust.label", request),
					response);
		}*/
	}

	/**
	 * @param request
	 * @param response
	 * @param nPageIdx
	 * @param nPageSize
	 */
	@RequestMapping(value = "find/userSelectList/{pageIdx}/{pageSize}", method = RequestMethod.POST)
	public void userSelectList(HttpServletRequest request,
			HttpServletResponse response,
			@PathVariable("pageIdx") Integer nPageIdx,
			@PathVariable("pageSize") Short nPageSize) {
		/*nPageSize = RequestUtils.getRequestValidPageSize(nPageSize);

		Map<String, Object> params = new HashMap<String, Object>();
		String mp = (String) RequestUtils.getString(request, "phone");
		if (StringUtils.isNotEmpty(mp)) {
			mp = AESUtils.getInst().encrypt(mp);
		}
		params.put("status", RequestUtils.getString(request, "status"));
		params.put("shopId", RequestUtils.getString(request, "shopId"));
		MapUtils.addPercentToMap(params, "mp", mp);
		MapUtils.addPercentToMap(params, "username",
				RequestUtils.getString(request, "username"));
		MapUtils.addPercentToMap(params, "username",
				RequestUtils.getString(request, "name"));
		MapUtils.addPercentToMap(params, "loginname",
				RequestUtils.getString(request, "loginname"));
		// params.put("username", RequestUtils.getString(request, "username"));
		// params.put("loginname", RequestUtils.getString(request,
		// "loginname"));
		try {
			GsonEbRst gsonEbRst = dao.getUserList2(params, nPageIdx, nPageSize);
			ResponseUtils.setResponseResult(gsonEbRst, response);
		} catch (SQLException e) {
			logger.error(e);
			ResponseUtils.setErrorMsgResponse(RequestUtils
					.getSqlFindErrorMessage("info.cust.label", request),
					response);
		}*/
	}

	/**
	 * @param request
	 * @param response
	 * @param shopId
	 * @param nPageIdx
	 * @param nPageSize
	 */
	@RequestMapping(value = "find/userById", method = RequestMethod.GET)
	public void getUserById(HttpServletRequest request,
			HttpServletResponse response) {
		/*Long id = RequestUtils.getLong(request, RequestUtils.ID);
		try {
			// GsonEbRst gsonEbRst = dao.getUserList(params, nPageIdx,
			// nPageSize);
			Map<String, Object> params = new HashMap<String, Object>();
			params.put("id", id);
			Short paeShort = 1;
			GsonEbRst g = dao.getUserList(params, 1, paeShort);
			ResponseUtils.setResponseResult(g, response);
		} catch (SQLException e) {
			logger.error(e);
			ResponseUtils.setErrorMsgResponse(RequestUtils
					.getSqlFindErrorMessage("info.cust.label", request),
					response);
		}*/
	}

}
